/*
 ============================================================================
 Page	     : 226
 Name        : guess.c
 Date	     : 20210404
 Author      : Hbue 18060333
 Copyright   : Your copyright notice
 Description : 一个拖沓且错误的猜数字游戏
 ============================================================================
 */

#include <stdio.h>
int main(void)
{
	int guess = 1;

	printf("Pick an integer from 1 to 100. I will try to guess ");
	printf("it.\nRespond with a y if my guess is right and with");
	printf("\nan n if it is wrong.\n");
	printf("Uh...is your number %d?\n", guess);
	while(getchar() != 'y')			/* 获取响应,与y作对比 */
	{
		printf("Well, then, is it %d?\n", ++guess);
	}
	printf("I knew I could do it!\n");

	return 0;
}

